t = int(input())


def f(num):


for _ in range(t):
    a, b, c = map(int, input().split())
    left = 0
    right = int(1e9)
    while left <= right:
        mid = (left + right) >> 1
